for a in range(100,1000):
    x=a//100
    y=a//10-10*x
    z=a-100*x-10*y
    if a==x**3+y**3+z**3:
        print(a,end=" ")
    else:
        pass